<include file="Public:header" />
<form id="info_form" action="{:U('House/edit')}" method="post" enctype="multipart/form-data">
<div class="pad_lr_10">
	<div class="col_tab">
		<ul class="J_tabs tab_but cu_li">
            <li class="current">基本信息</li>
            <li>基础数据</li>
            <li>详细内容</li>
            <li>SEO设置</li>
		</ul>
		<div class="J_panes">
			<div class="content_list pad_10">
				<table width="100%" cellspacing="0" class="table_form">
					<tr>
						<th width="100">所属区域 :</th>
						<td><select class="J_cate_select mr10" data-pid="0" data-menuid="1" data-uri="{:U('HouseCate/ajax_getchilds')}" data-selected="{$selected_ids}"></select>
                			<input type="hidden" name="area_id" id="J_cate_id" value="{$info.area_id}" /></td>
					</tr>
                    <tr>
                        <th>楼盘名称 :</th>
                        <td>
                            <input type="text" name="title" id="J_title" value="{$info.title}" class="input-text" size="50">
                            <!--input type="hidden" value="" name="color" id="J_color">
                            <a href="javascript:;" class="color_picker_btn"><img class="J_color_picker" data-it="J_title" data-ic="J_color" src="__IMG__/color.png"></a-->
                        </td>
                    </tr>
                    <tr>
                        <th>副标题 :</th>
                        <td><input type="text" name="short_title" id="J_short_title" class="input-text" value="{$info.short_title}" size="40" /></td>
                    </tr>
                    <tr>
                        <th>楼盘均价 :</th>
                        <td>
                            <input type="text" name="average_price"   value="{$info.average_price}"  class="input-text" size="10" /> <span>元/平米</span>
                            开盘价 :
                            <input type="text" name="price" value="{$info.price}"  class="input-text" size="10" /> <span>元/平米</span>
                            最低首付 :
                            <input type="text" name="first_pay" id="J_first_pay" class="input-text" value="{$info.first_pay}" size="10" /> <span>万元</span>
                        </td>
                    </tr>
                    <tr>
                        <th>楼盘状态 :</th>
                        <td>{:getLinkMenu(4,'house_status','radio',$info['house_status'])}</td>
                    </tr>
                    <tr id="open_time" <if condition="$info['house_status'] eq 52">style="display:none;"</if>>
                        <th>开盘时间 :</th>
                        <td>
                            <input type="text" name="open_time" id="J_open_time" onclick="myCalendar();" <if condition="$info['open_time'] gt 0">value="{$info.open_time|date='Y-m-d',###}"</if> class="date" size="12" />
                            交房时间 :
                            <input type="text" name="room_time" id="J_room_time" onclick="myCalendar();" <if condition="$info['room_time'] gt 0">value="{$info.room_time|date='Y-m-d',###}"</if> class="date" size="12" />
                        </td>
                    </tr>

                    <tr>
                        <th>地图标注：</th>
                        <td>
                            <input type="text" name="map" id="map" class="input-text" size="27" value="{$info.map}"/>
                            &nbsp;&nbsp;<a href="http://api.map.baidu.com/lbsapi/getpoint/" style="padding: 8px;color:#ffffff;background: #008000" target="_blank">获取百度地图坐标</a>
                        </td>
                    </tr>
                    <tr>
                        <th>特色标签 :</th>
                        <td>{:getLinkMenu(6,'tags','checkbox',$tags)}</td>
                    </tr>
                    <tr>
                        <th>楼盘类型 :</th>
                        <td>{:getLinkMenu(2,'house_type','checkbox',$house_type)}</td>
                    </tr>
                    <tr>
                        <th>户型类型 :</th>
                        <td>{:getLinkMenu(3,'room_type','checkbox',$room_type)}</td>
                    </tr>
                    <tr>
                        <th>楼层类型 :</th>
                        <td>{:getLinkMenu(9,'floor','checkbox',$floor)}<br><span>1~3层为低层,4~7层为多层,8~12层为小高层,13~25层为高层26层,100米以上为超高层</span></td>
                    </tr>
                    <tr>
                        <th>装修程度 :</th>
                        <td>{:getLinkMenu(10,'renovation_type','radio',$info['renovation_type'])}</td>
                    </tr>
                    <tr>
                        <th>环线 :</th>
                        <td>{:getLinkMenu(7,'loop_line','radio',$info['loop_line'])}</td>
                    </tr>
                    <tr>
                        <th>地铁 :</th>
                        <td>{:getLinkMenu(8,'metro','radio',$info['metro'])}</td>
                    </tr>
                    <tr>
                        <th>楼盘商圈 :</th>
                        <td><input type="text" name="address[1]" id="address1" value="{$address[0]}" class="input-text" size="30"/> </td>
                    </tr>
                    <tr>
                        <th>楼盘地址 :</th>
                        <td><input type="text" name="address[2]" id="address2" value="{$address[1]}" class="input-text" size="40"/> </td>
                    </tr>
                    <tr>
                        <th>售楼处地址 :</th>
                        <td><input type="text" name="seller_address" id="seller_address" value="{$info.seller_address}" class="input-text" size="30"/> </td>
                    </tr>
                    <tr>
                        <th>售楼处电话 :</th>
                        <td><input type="text" name="tel[1]" id="tel1" value="{$tel[0]}" class="input-text" size="25"/> 转 <input type="text" name="tel[2]" id="tel2" value="{$tel[1]}" class="input-text" size="10"/> </td>
                    </tr>
                    <tr>
                        <th>缩略图:</th>
                        <td>
                            <notempty name="info['img']"><img src="{$info.img}" width="100" height="100"/><br /></notempty>
                            <input type="file" name="img" class="input-text"  style="width:200px;" />
                        </td>
                    </tr>
                    <tr>
                        <th>logo图片:</th>
                        <td>
                            <notempty name="info['logo_img']"><img src="{$info.logo_img}" width="100" height="100"/><br /></notempty>
                            <input type="text" name="logo_img" id="J_img" value="{$info.logo_img}" class="input-text fl mr10" size="30">
                            <div id="J_upload_img" class="upload_btn"><span>{:L('upload')}</span></div>图片尺寸：140*70
                        </td>
                    </tr>
                    <tr>
                        <th>团购特惠 :</th>
                        <td><input type="text" name="group_discount" value="{$info.group_discount}" class="input-text"  size="40"></td>
                    </tr>
                    <tr>
                        <th>惠 :</th>
                        <td><input type="text" name="discount" value="{$info.discount}" class="input-text"  size="40"></td>
                    </tr>
                    <tr>
                        <th>独家优惠 :</th>
                        <td><textarea name="coupons" style="width:780px;height:80px;resize: none;">{$info.coupons}</textarea></td>
                    </tr>
                    <tr>
                        <th>价格分析 :</th>
                        <td><textarea name="price_analysis" id="" style="width:780px;height:80px;">{$house_data.price_analysis}</textarea></td>
                    </tr>
                    <tr>
                        <th>人气 :</th>
                        <td>
                            <input type="text" name="houseInfo[hits]" value="{$house_info.hits}" class="input-text" size="10" />&nbsp;&nbsp;
                            收藏 : <input type="text" name="houseInfo[collection]" value="{$house_info.collection}" class="input-text" size="10" />&nbsp;&nbsp;
                            中意 : <input type="text" name="houseInfo[italy]" value="{$house_info.italy}" class="input-text" size="10" />
                        </td>
                    </tr>
                    <tr>
                        <th>QQ群连接 :</th>
                        <td>
                            <input type="text" name="houseInfo[qq_qun]" value="{$house_info.qq_qun}" class="input-text" size="80" />&nbsp;&nbsp;
                            <a target="_blank" href="http://qun.qq.com/join.html">QQ群链接请到这里获取</a>
                        </td>
                    </tr>
                    <tr>
                        <th>{:L('publish')} :</th>
                        <td>
                            <label><input type="radio" name="status" class="radio_style" value="1" <if condition="$info.status eq '1'">checked="checked"</if>> {:L('yes')}</label>&nbsp;&nbsp;
                            <label><input type="radio" name="status" class="radio_style" value="0" <if condition="$info.status eq '0'">checked="checked"</if>> {:L('no')}</label>
                        </td>
                    </tr>
				</table>
			</div>
            <div class="content_list pad_10 hidden">
                <table width="100%" cellspacing="0" class="table_form">
                    <tr>
                        <th>楼盘概况 :</th>
                        <td>
                            <table width="88%"  cellspacing="0" class="table_form">
                                <tr>
                                    <th width="100">建筑面积：</th>
                                    <td><input type="text" name="data[jzmj]" class="input-text" value="{$data.jzmj}" size="20" /></td>
                                    <th width="100">物业类型：</th>
                                    <td><input type="text" name="data[wylx]" class="input-text" value="{$data.wylx}" size="20" /></td>
                                    <th width="100">户型面积：</th>
                                    <td><input type="text" name="data[hxmj]" class="input-text" value="{$data.hxmj}" size="20" /></td>
                                </tr>
                                <tr>
                                    <th width="100">建筑类别：</th>
                                    <td><input type="text" name="data[jzlb]" class="input-text" value="{$data.jzlb}" size="20" /></td>
                                    <th width="100">装修情况：</th>
                                    <td><input type="text" name="data[zxqk]" class="input-text" value="{$data.zxqk}" size="20" /></td>
                                    <th width="100">产　　权：</th>
                                    <td><input type="text" name="data[chanquan]" class="input-text" value="{$data.chanquan}" size="20" /></td>
                                </tr>
                                <tr>
                                    <th width="100">户　　数：</th>
                                    <td><input type="text" name="data[hushu]" class="input-text" value="{$data.hushu}" size="20" /></td>
                                    <th width="100">容 积 率：</th>
                                    <td><input type="text" name="data[rjl]" class="input-text" value="{$data.rjl}" size="20" /></td>
                                    <th width="100">开 发 商：</th>
                                    <td><input type="text" name="data[kfs]" class="input-text" size="20" value="{$data.kfs}"/></td>
                                </tr>
                                <tr>
                                    <th width="100">绿 化 率：</th>
                                    <td><input type="text" name="data[lhl]" class="input-text" value="{$data.lhl}" size="20" /></td>
                                    <th width="100">物业公司：</th>
                                    <td><input type="text" name="data[wygs]" class="input-text" size="20" value="{$data.wygs}" /></td>
                                    <th width="100">车    位：</th>
                                    <td><input type="text" name="data[chewei]" class="input-text" size="20" value="{$data.chewei}" /></td>
                                </tr>
                                <tr>
                                    <th width="100">道路交通：</th>
                                    <td colspan="5"><textarea name="data[dljt]" style="width: 780px;height: 66px;">{$data.dljt}</textarea></td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                    <th>装修信息 :</th>
                    <td>
                        <table width="88%"  cellspacing="0" class="table_form">
                            <tr>
                                <th style="width: 100px;">装修标准：</th>
                                <td><textarea  name="data[zxbz]" style="width: 780px;height: 66px;">{$data.zxbz}</textarea></td>
                            </tr>
                            <tr>
                                <th>建筑设计：</th>
                                <td><input type="text" name="data[jzsj]" value="{$data.jzsj}" size="66" class="input-text"></td>
                            </tr>
                            <tr>
                                <th>建筑施工：</th>
                                <td><input type="text" name="data[jzsg]" value="{$data.jzsg}" size="66"  class="input-text"></td>
                            </tr>
                            <tr>
                                <th>广告公司：</th>
                                <td><input type="text" name="data[gggs]" value="{$data.gggs}" size="66"  class="input-text"></td>
                            </tr>
                        </table>
                    <td>
                    </tr>
                    <tr>
                        <th>配套信息 :</th>
                        <td>
                            <table width="88%"  cellspacing="0" class="table_form">
                                <tr>
                                    <th style="width: 100px;">学校：</th>
                                    <td><textarea name="mating[xuexiao]" style="width: 780px;height: 66px;">{$mating.xuexiao}</textarea></td>
                                </tr>
                                <tr>
                                    <th>购物：</th>
                                    <td><textarea name="mating[gouwu]" style="width: 780px;height: 66px;">{$mating.gouwu}</textarea></td>
                                </tr>
                                <tr>
                                    <th>医院：</th>
                                    <td><textarea name="mating[yiyuan]" style="width: 780px;height: 66px;">{$mating.yiyuan}</textarea></td>
                                </tr>
                                <tr>
                                    <th>生活：</th>
                                    <td><textarea name="mating[shenghuo]" style="width: 780px;height: 66px;">{$mating.shenghuo}</textarea></td>
                                </tr>
                                <tr>
                                    <th>娱乐：</th>
                                    <td><textarea name="mating[yule]" style="width: 780px;height: 66px;">{$mating.yule}</textarea></td>
                                </tr>
                                <tr>
                                    <th>餐饮：</th>
                                    <td><textarea name="mating[canyin]" style="width: 780px;height: 66px;">{$mating.canyin}</textarea></td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </div>
            <div class="content_list pad_10 hidden">
                <table width="100%" cellspacing="0" class="table_form">
                    <tr>
                        <th>楼盘优点 :</th>
                        <td><textarea name="special" id="special" style="width:780px;height:100px;resize: none;">{$house_data.special}</textarea></td>
                    </tr>
                    <tr>
                        <th>楼盘缺点 :</th>
                        <td><textarea name="shortcoming" id="shortcoming" style="width:780px;height:100px;resize: none;">{$house_data.shortcoming}</textarea></td>
                    </tr>
                    <tr>
                        <th>项目介绍 :</th>
                        <td><script id="info" name="info" type="text/plain">{$house_data.info}</script></td>
                    </tr>
                </table>
            </div>
			<div class="content_list pad_10 hidden">
				<table width="100%" cellspacing="0" class="table_form">
					<tr>
						<th width="100">{:L('seo_title')} :</th>
		 				<td><input type="text" name="seo_title" id="seo_title" class="input-text" size="60" value="{$info.seo_title}"></td>
					</tr>
					<tr>
						<th>{:L('seo_keys')} :</th>
						<td><input type="text" name="seo_keys" id="seo_keys" class="input-text" size="60" value="{$info.seo_keys}"></td>
					</tr>
					<tr>
						<th>{:L('seo_desc')} :</th>
						<td><textarea name="seo_desc" id="seo_desc" cols="80" rows="8">{$info.seo_desc}</textarea></td>
					</tr>
				</table>
			</div>
        </div>
		<div class="mt10"><input type="submit" value="{:L('submit')}" id="dosubmit" name="dosubmit" class="btn btn_submit" style="margin:0 0 10px 100px;"><br /><br /><br /></div>
	</div>
</div>
<input type="hidden" name="menuid"  value="{$menuid}"/>
<input type="hidden" name="id" id="id" value="{$info.id}" />
</form>
<include file="Public:footer" />
<js file="__STATIC__/ueditor/ueditor.config.js" charset="utf-8" />
<js file="__STATIC__/ueditor/ueditor.all.min.js" charset="utf-8" />
<js file="__STATIC__/ueditor/lang/zh-cn/zh-cn.js" charset="utf-8" />
<js file="__STATIC__/js/calendar/WdatePicker.js" charset="utf-8" />
<script src="__JS__/fileuploader.js"></script>
<script type="text/javascript">
    window.UEDITOR_HOME_URL='__STATIC__/ueditor/';
    window.onload=function(){
        window.UEDITOR_CONFIG.initialFrameWidth=880;
        window.UEDITOR_CONFIG.initialFrameHeight=500;
        UE.getEditor('info',{autoFloatEnabled:false});
       // UE.getEditor('special',{initialFrameWidth:880,initialFrameHeight:100,toolbars: [
        //    ['fullscreen', 'source', 'undo', 'redo', 'bold',"fontfamily", "fontsize", "bold", "italic", "underline", "forecolor", "backcolor", "insertorderedlist", "insertunorderedlist"]
       // ],autoFloatEnabled:false});
    }
</script>
<script type="text/javascript">
    $(function(){
        $('ul.J_tabs').tabs('div.J_panes > div');
        $('.J_cate_select').cate_select('请选择');
        $.formValidator.initConfig({formid:"info_form",autotip:true});
        $("#J_title").formValidator({onshow:"请填写楼盘名称",onfocus:"请填写楼盘名称"}).inputValidator({min:1,onerror:"请填写楼盘名称"});
        $("#J_price").formValidator({onshow:"楼盘起价只能填写数字(元/平米)",onfocus:"请填写楼盘起价"}).inputValidator({min:1,onerror:"请填写楼盘起价"}).regexValidator({regexp:"num1",datatype:"enum",onerror:"价格只能为数字"});
        $("#J_average_price").formValidator({onshow:"楼盘均价只能填写数字(元/平米)",onfocus:"请填写楼盘均价"}).inputValidator({min:1,onerror:"请填写楼盘均价"}).regexValidator({regexp:"num1",datatype:"enum",onerror:"价格只能为数字"});
        $("#J_cate_id").formValidator({onshow:"请选择区域",onfocus:"请选择区域"}).regexValidator({regexp:"intege1",datatype:"enum",onerror:"请选择区域"});
        //上传图片
        var img_uploader = new qq.FileUploaderBasic({
            allowedExtensions: ['jpg','gif','jpeg','png','bmp','pdg'],
            button: document.getElementById('J_upload_img'),
            multiple: false,
            action: "{:U('House/ajax_upload_img')}",
            inputName: 'img',
            forceMultipart: true, //用$_FILES
            messages: {
                typeError: lang.upload_type_error,
                sizeError: lang.upload_size_error,
                minSizeError: lang.upload_minsize_error,
                emptyError: lang.upload_empty_error,
                noFilesError: lang.upload_nofile_error,
                onLeave: lang.upload_onLeave
            },
            showMessage: function(message){
                $.pinphp.tip({content:message, icon:'error'});
            },
            onSubmit: function(id, fileName){
                $('#J_upload_img').addClass('btn_disabled').find('span').text(lang.uploading);
            },
            onComplete: function(id, fileName, result){
                $('#J_upload_img').removeClass('btn_disabled').find('span').text(lang.upload);
                if(result.status == '1'){
                    $('#J_img').val(result.data);
                } else {
                    $.pinphp.tip({content:result.msg, icon:'error'});
                }
            }
        });
    });

</script>
</body>
</html>